import { createApp } from 'vue'
import XEditor from '@/lui/strToList/toList.vue'
const createDialog = (option = {}) => {
    const mountNode = document.createElement('div')
    const Instance = createApp(XEditor, {
        show: true,
        ...option,
        close: () => {
            Instance.unmount(mountNode)
            document.body.removeChild(mountNode)
        }
    })

    document.body.appendChild(mountNode)
    Instance.mount(mountNode)
}

export default createDialog
